package org.oschina.handler.lock.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 锁
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Lock {

	/**
	 * 标识
	 * @return
	 */
	public String key();
	
	/**
	 * 超时时间 (秒)
	 * @return
	 */
	public int timeout() default 1;
}